home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 July / Chip_1998-07_cd.bin / zkuste / mazda / mazIn311.dxr / Internal_6_Message Sprite + menter.ls < prev    next >
Encoding:
Text File  |  1998-05-06  |  2.3 KB  |  69 lines

  1. property whichevent, Addressee, EventToSend, params, params2, params3
  2.  
  3. on initSendSprite me
  4.   init(me)
  5. end
  6.  
  7. on mouseUp me
  8.   if whichevent = #mouseUp then
  9.     init(me)
  10.   end if
  11. end
  12.  
  13. on mouseDown me
  14.   if whichevent = #mouseDown then
  15.     init(me)
  16.   end if
  17. end
  18.  
  19. on mouseEnter me
  20.   if whichevent = #mouseEnter then
  21.     init(me)
  22.   end if
  23. end
  24.  
  25. on mouseLeave me
  26.   if whichevent = #mouseEnter then
  27.     set params to params2
  28.     init(me)
  29.   end if
  30. end
  31.  
  32. on prepareFrame me
  33.   if whichevent = #prepareFrame then
  34.     init(me)
  35.   end if
  36.   if whichevent = #mouseEnter then
  37.     set params3 to params
  38.   end if
  39. end
  40.  
  41. on enterFrame me
  42.   if whichevent = #enterFrame then
  43.     init(me)
  44.   end if
  45. end
  46.  
  47. on exitFrame me
  48.   if whichevent = #exitFrame then
  49.     init(me)
  50.   end if
  51. end
  52.  
  53. on init me
  54.   set doit to "sendSprite the Addressee of me, the EventToSend of me," && params
  55.   do(doit)
  56.   if whichevent = #mouseEnter then
  57.     set params to params3
  58.   end if
  59. end
  60.  
  61. on getPropertyDescriptionList
  62.   set p_list to [#EventToSend: [#comment: "Message:", #format: #symbol, #default: #generic_event], #params: [#comment: "Param1, param2, ...", #format: #string, #default: EMPTY], #params2: [#comment: "Basic Param1, param2, ...", #format: #string, #default: EMPTY], #Addressee: [#comment: "Target Sprite:", #format: #integer, #default: 1], #whichevent: [#comment: "Initializing Event:", #format: #symbol, #range: [#mouseUp, #mouseDown, #mouseEnter, #prepareFrame, #enterFrame, #exitFrame, #initSendSprite], #default: #mouseUp]]
  63.   return p_list
  64. end
  65.  
  66. on getBehaviorDescription
  67.   return "Sends a message to the designated sprite when the specified event occurs.  Any behaviors attached to the target sprite that are triggered by the message will be executed." & RETURN & "PARAMETERS:" & RETURN & "ΓÇó Message - Enter the message to send to the target sprite." & RETURN & "ΓÇó Params  - Enter parameters to be sent with the message, seperated with commas." & RETURN & "ΓÇó Target Sprite - Enter the number of the sprite channel to which message should be sent." & RETURN & "ΓÇó Initializing Event - Specify the event that triggers the behavior." & RETURN & "NOTES:" & RETURN & "If there is no behavior attached to the target sprite that responds to the message being sent, the message is passed to the cast member script, the current frame script, and then movie scripts."
  68. end
  69.